{% extends "base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% load dv_filters %}
{% block head_title %}{% if season %}{% trans "Édition du mois" %}{% else %}{% trans "Nouveau mois" %}{% endif %}{% endblock %}

{% block bootstrap3_extra_head %}
{{ form.media.css }}
{% endblock %}
{% block bootstrap3_extra_script %}
    {{ form.media.js }}
    {% include 'snippets/datetimepicker_js.html' %}
{% endblock %}

{% block content %}
    <h1>{% if season %}{% trans "Édition du mois" %}{% else %}{% trans "Nouveau mois" %}{% endif %}</h1>


    <form method="POST" action="" class="form-horizontal">
        {% csrf_token %}
        {% bootstrap_form form layout='horizontal' size='small' %}
        {% buttons %}
            <button type="submit" class="btn btn-primary pull-right">{% trans "Enregistrer" %}</button>
            {% if season %}
                <a class="btn btn-default" href="{% url 'season-detail' pk=season.pk %}">{% trans "Annuler" %}</a>
            {% else %}
                <a class="btn btn-default" href="{% dv_season_url %}">{% trans "Annuler" %}</a>
            {% endif %}
        {% endbuttons %}
    </form>
{% endblock %}
